<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <!-- 引包 -->
    <script src="../js/vue.js"></script>
    <style>
        *{margin: 0;padding: 0;}
        #app{
            width: 400px;
            margin: 50px auto;
        }
        .box{
            width: 200px;
            height: 200px;
            background: pink;
        }
    </style>
</head>
<body>
    <!-- 容器|模板 -->
    <div id="app">
        <div class="box" :style="{background:`rgb(${r},${g},${b})`}"></div>
        <div class="form">
            R: <input type="range" min="0" max="255" v-model="r"><br>
            G: <input type="range" min="0" max="255" v-model="g"><br>
            B: <input type="range" min="0" max="255" v-model="b">
        </div>
    </div>
</body>
</html>
<script>
     //关联VM
     const VM = new Vue({
         el:'#app',
         data:{
             r:'',
             g:'',
             b:''
         }
     })
</script>